12 |
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39883],{77446:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[chapterId]/reflections",function(){return n(66700)}])},73756:function(e,t,n){"use strict";var r=n(57611),i=n(67597),a=n(62103),o=n(19175),s=n(10117),c=n(87739),u=function(e){var t=e.queryKey,n=e.render,i=e.renderError,u=e.initialData,f=e.loading,l=void 0===f?function(){return(0,r.jsx)(s.Z,{})}:f,_=e.fetcher,d=void 0===_?c._i:_,h=e.showSpinnerOnRevalidate,p=void 0===h||h,m=e.onFetchSuccess,v=(0,a.Z)(t,(function(){return d(t).then((function(e){return null===m||void 0===m||m(e),Promise.resolve(e)})).catch((function(e){return Promise.reject(e)}))}),{fallbackData:u}),g=v.data,w=v.error,b=v.isValidating,S=v.mutate;if(p?b:b&&!g)return l();if(w){if(i){var x=i(w);if("undefined"!==typeof x)return x}return(0,r.jsx)(o.Z,{onRetryClicked:function(){S()},error:w})}return n(g)};t.Z=(0,i.memo)(u)},19175:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r,i=n(57611),a=n(67597),o=n(61395),s=n(36284),c=n.n(s),u=n(85494);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}var l=function(e){return a.createElement("svg",f({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=a.createElement("path",{d:"M1.85 7.5c0-2.835 2.21-5.65 5.65-5.65 2.778 0 4.152 2.056 4.737 3.15H10.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-1 0v1.813C12.296 3.071 10.666.85 7.5.85 3.437.85.85 4.185.85 7.5c0 3.315 2.587 6.65 6.65 6.65 1.944 0 3.562-.77 4.714-1.942a6.77 6.77 0 0 0 1.428-2.167.5.5 0 1 0-.925-.38 5.77 5.77 0 0 1-1.216 1.846c-.971.99-2.336 1.643-4.001 1.643-3.44 0-5.65-2.815-5.65-5.65Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))},_=n(87739),d=function(e){var t=e.onRetryClicked,n=e.error,r=(0,o.Z)("common").t;return(0,i.jsxs)("div",{className:c().container,children:[(0,i.jsx)("p",{className:c().text,children:n.message!==_.yH?r("error.general"):r("error.offline")}),(0,i.jsx)(u.ZP,{prefix:(0,i.jsx)(l,{}),size:u.qE.Small,type:u.L$.Secondary,onClick:t,children:r("retry")})]})}},21648:function(e,t,n){"use strict";var r=n(57044),i=n(16946),a=n(96151),o=n(57611),s=(n(67597),n(41801)),c=n(48842);t.Z=function(e){var t=e.url,n=e.image,u=e.imageAlt,f=e.imageHeight,l=e.imageWidth,_=e.openGraph,d=e.description,h=(0,a.Z)(e,["url","image","imageAlt","imageHeight","imageWidth","openGraph","description"]),p=(0,r.Z)({},_&&{openGraph:_},t&&{url:t},n&&{images:[{url:n,width:l,height:f,alt:u}]}),m=(0,r.Z)({},h,d&&{description:(0,c.aS)(d,150)});return(0,o.jsx)(s.PB,(0,i.Z)((0,r.Z)({},m),{openGraph:p}))}},54569:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r,i=n(57611),a=n(67597),o=n(33770),s=n.n(o),c=n(61395),u=n(73756),f=n(35702),l=n(11332),_=n(32190),d="development"===n(25620).env.NEXT_PUBLIC_VERCEL_ENV,h=function(e,t){d&&t&&(t.textContent="OBSERVER DEBUGGER: ".concat(e))},p=function(e,t,n,r,i){var o=e.threshold,s=void 0===o?1:o,c=e.root,u=void 0===c?null:c,f=e.rootMargin,l=void 0===f?"0%":f,p=(0,a.useRef)(new Map),m=(0,a.useCallback)((function(e){e.forEach((function(e){var n;if(d){var a=e.target.getElementsByClassName("debugger");a.length&&(n=a[0])}var o=e.target,s=o.dataset[r],c=Number(o.dataset[i]);e.isIntersecting?(h("Element is fully visible, triggering callback in ".concat(c/1e3," seconds..."),n),p.current.set(s,window.setTimeout((function(){t(e.target),h("Element callback triggered",n)}),c))):(clearTimeout(p.current.get(s)),p.current.delete(s),h("Element is not fully visible, won't trigger callback",n))}))}),[i,r,t]);(0,_.Z)((function(){if(!!window.IntersectionObserver)return window[n]||(window[n]=new IntersectionObserver(m,{threshold:s,root:u,rootMargin:l})),function(){p.current.forEach((function(e){clearTimeout(e)})),window[n]&&(window[n].disconnect(),window[n]=void 0)}}),[u,l,s,m,n])},m=n(19226),v=n(76854),g=n(1997),w=n(57044),b=n(51726),S=n(87739),x=n(32837);!function(e){e.MostPopular="most_popular",e.Newest="newest",e.Feed="feed",e.Public="public"}(r||(r={}));var k=r,T=n(25620),N="production"===T.env.NEXT_PUBLIC_VERCEL_ENV?"https://quranreflect.com":"https://quranreflect.org",V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,w.Z)({client_auth_token:T.env.NEXT_PUBLIC_QURAN_REFLECT_TOKEN},t);return"".concat(N,"/").concat(e,"?").concat((0,x.Z)(n))},I=function(e){var t=e.surahId,n=e.ayahNumber,r=e.locale,i=e.page,a=void 0===i?1:i,o=e.tab,s=void 0===o?k.MostPopular:o,c=Number(t)+1;return V("posts.json",{"q[filters_attributes][0][chapter_id]":c,"q[filters_attributes][0][from]":n,"q[filters_attributes][0][to]":n,"q[filters_operation]":"OR",page:a,tab:s,lang:r,feed:!0})},C=function(e){return V("v1/posts/".concat(e,"/views"))},Z=function(){var e=(0,g.Z)((function(e){return(0,b.__generator)(this,(function(t){return[2,(0,S._i)(C(e),{method:"POST",headers:{"Content-Type":"application/json"}})]}))}));return function(t){return e.apply(this,arguments)}}(),y=(function(){var e=(0,g.Z)((function(e){return(0,b.__generator)(this,(function(t){return[2,(0,S._i)(e)]}))}))}(),s()((function(){return n.e(10842).then(n.bind(n,10842))}),{loadableGenerated:{webpack:function(){return[10842]}},ssr:!1})),E=s()((function(){return Promise.all([n.e(13147),n.e(37154)]).then(n.bind(n,37154))}),{loadableGenerated:{webpack:function(){return[37154]}},ssr:!1,loading:l.Z}),j=function(e){var t=e.render,n=e.initialChapterId,r=e.initialVerseNumber,o=e.scrollToTop,s=(0,a.useState)(n),_=s[0],d=s[1],h=(0,a.useState)(r),g=h[0],w=h[1],b=(0,c.Z)().lang,S=(0,a.useCallback)((function(e){var t=e.getAttribute("data-post-id");(0,m.jl)()?(0,v.GG)(t).catch((function(){})):Z(t).catch((function(){}))}),[]);p({threshold:1},S,f.yG,"postId","countAsViewedAfter");var x=(0,a.useCallback)((function(e){return(0,i.jsx)(E,{data:e,selectedChapterId:_,selectedVerseNumber:g,setSelectedVerseNumber:w,scrollToTop:o})}),[o,_,g]),k=(0,i.jsx)(u.Z,{loading:l.Z,queryKey:I({surahId:_,ayahNumber:g,locale:b}),render:x});return t({surahAndAyahSelection:(0,i.jsx)(y,{selectedChapterId:_,selectedVerseNumber:g,setSelectedChapterId:d,setSelectedVerseNumber:w}),body:k})}},11332:function(e,t,n){"use strict";var r=n(45361),i=n(57611),a=n(37014),o=n.n(a),s=n(57065),c=n.n(s),u=n(34756),f=n.n(u),l=n(90914);t.Z=function(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{className:(f().tafsirSkeletonItem,f().ayahSekletonItem)}),c()(1,15).map((function(e){var t;return(0,i.jsx)(l.Z,{className:o()(f().tafsirSkeletonItem,(t={},(0,r.Z)(t,f().tafsirSkeletonItem1,e%1===0),(0,r.Z)(t,f().tafsirSkeletonItem2,e%2===0),(0,r.Z)(t,f().tafsirSkeletonItem3,e%3===0),t))},e)}))]})}},35702:function(e,t,n){"use strict";n.d(t,{FW:function(){return a},NM:function(){return r},s$:function(){return o},yG:function(){return i}});var r="quranReaderObserver",i="reflectionsObserver",a=function(e){return{rootMargin:e?"-115.6px 0px -70% 0px":"-131.6px 0px -68% 0px",threshold:.1}},o=function(e){return{verseKey:e.getAttribute("data-verse-key"),chapterId:e.getAttribute("data-chapter-id"),page:e.getAttribute("data-page"),hizb:e.getAttribute("data-hizb")}}},66700:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return h}});var r=n(57611),i=(n(67597),n(61395)),a=n(99968),o=n(21648),s=n(54569),c=n(32275),u=n(50148),f=n(86719),l=n.n(f),_=n(43609),d=n(84020),h=!0;t.default=function(e){var t=e.hasError,n=e.chapter,f=e.verseNumber,h=e.chapterId,p=e.fallback,m=(0,i.Z)("quran-reader"),v=m.t,g=m.lang;if(t)return(0,r.jsx)(u.default,{statusCode:500});var w=(0,d.HT)("".concat(h,":").concat(f));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Z,{title:"".concat(n.chapter.transliteratedName," - ").concat((0,_.rQ)(Number(f),g)," ").concat(v("common:reflections")," "),image:(0,c.oJ)({chapterId:h,verseNumber:f,locale:g}),imageWidth:1200,imageHeight:630,canonical:(0,d.Z2)(g,w),languageAlternates:(0,_.qc)(w),description:v("reflections-desc",{ayahNumber:f,surahName:n.chapter.transliteratedName})}),(0,r.jsx)(a.J$,{value:{fallback:p},children:(0,r.jsx)("div",{className:l().pageContainer,children:(0,r.jsx)("div",{className:l().flow,children:(0,r.jsx)("div",{className:l().flowItem,children:(0,r.jsx)(s.Z,{scrollToTop:d.hb,initialChapterId:h,initialVerseNumber:f.toString(),render:function(e){var t=e.body,n=e.surahAndAyahSelection;return(0,r.jsxs)("div",{children:[n,t]})}})})})})})]})}},50148:function(e,t,n){"use strict";n.r(t);var r=n(45361),i=n(57611),a=n(37014),o=n.n(a),s=n(15129),c=n(61395),u=n(61085),f=n.n(u),l=n(85494),_=n(57830);t.default=function(e){e.statusCode;var t=e.hasFullWidth,n=void 0===t||t,a=(0,c.Z)("error").t,u=(0,s.useRouter)();return(0,i.jsxs)("div",{className:o()(f().container,(0,r.Z)({},f().withFullWidth,n)),children:[(0,i.jsx)("h1",{className:f().title,children:a("title")}),(0,i.jsx)("div",{className:f().goBack,children:(0,i.jsx)(l.ZP,{onClick:function(){document&&document.referrer?u.back():u.push("/")},children:a("go-back")})}),(0,i.jsxs)("p",{className:f().reportBug,children:[a("if-persist")," ",(0,i.jsx)(_.Z,{href:"https://feedback.quran.com/",variant:_.r.Highlight,children:a("report-cta")})]})]})}},76854:function(e,t,n){"use strict";n.d(t,{Fp:function(){return f},GG:function(){return s},P_:function(){return c},ST:function(){return u}});var r=n(1997),i=n(51726),a=n(75879),o=n(9740),s=function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.j0)((0,a.PI)(e),{})]}))}));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.j0)((0,a.bE)(e),{})]}))}));return function(t){return e.apply(this,arguments)}}(),u=function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.UK)((0,a.BC)(e))]}))}));return function(t){return e.apply(this,arguments)}}(),f=(function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.UK)((0,a.YV)(e))]}))}))}(),function(){var e=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.UK)((0,a.Sv)(e))]}))}));return function(t){return e.apply(this,arguments)}}())},75879:function(e,t,n){"use strict";n.d(t,{BC:function(){return s},PI:function(){return a},Sv:function(){return u},YV:function(){return c},bE:function(){return o}});var r=n(37572),i=function(e){return"qf/".concat(e)},a=function(e){return(0,r.bf)(i("posts/".concat(e,"/views")))},o=function(e){return(0,r.bf)(i("users/".concat(e,"/follow")))},s=function(e){return(0,r.bf)(i("users/".concat(e,"/is-followed")))},c=function(e){return(0,r.bf)(i("posts"),e)},u=function(e){return(0,r.bf)(i("quranic-calendar/".concat(e)))}},48842:function(e,t,n){"use strict";n.d(t,{Nl:function(){return a},aS:function(){return r},ox:function(){return i}});var r=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",r=e.split("",t),i="",a=0;a<r.length;a+=1){var o=r[a];if(i.length===t-1){i="".concat(i).concat(o).concat(n);break}i="".concat(i).concat(o)}return i},i=function(e){return e.replace(/(<([^>]+)>)/gi,"")},a=function(e){if(!e)return"";var t=e.split("-");return 1===t.length?t[0]:t[t.length-1]}},36284:function(e){e.exports={container:"Error_container__1m9XV",text:"Error_text__yg4kD"}},34756:function(e){e.exports={container:"TafsirView_container__R9G7I",tafsirName:"TafsirView_tafsirName__QPOiO",tafsirContainer:"TafsirView_tafsirContainer__g2rhW",rtl:"TafsirView_rtl__8pRLP",surahAndAyahSelectionContainer:"TafsirView_surahAndAyahSelectionContainer__W96nf",tafsirSelectionContainer:"TafsirView_tafsirSelectionContainer__QSkE3",tafsirSelectionItem:"TafsirView_tafsirSelectionItem__GTJvw",tafsirItemSelected:"TafsirView_tafsirItemSelected__SXceL",separatorContainer:"TafsirView_separatorContainer__diS8n",verseTextContainer:"TafsirView_verseTextContainer__A7tZ_",selectionItem:"TafsirView_selectionItem__FJdhi",ayahSelection:"TafsirView_ayahSelection__jWULb",tafsirSkeletonItem:"TafsirView_tafsirSkeletonItem__q5sNk",ayahSekletonItem:"TafsirView_ayahSekletonItem__B_nJN",tafsirSkeletonItem1:"TafsirView_tafsirSkeletonItem1__nLGRk",tafsirSkeletonItem2:"TafsirView_tafsirSkeletonItem2__aaEJy",tafsirSkeletonItem3:"TafsirView_tafsirSkeletonItem3__NqYKV",tafsirSelectionSkeleton:"TafsirView_tafsirSelectionSkeleton__3oq7k",languageSelection:"TafsirView_languageSelection__8EFqZ","tafsir-font-size-1":"TafsirView_tafsir-font-size-1__sLRnq","tafsir-font-size-2":"TafsirView_tafsir-font-size-2__JLiR2","tafsir-font-size-3":"TafsirView_tafsir-font-size-3__K0LBa","tafsir-font-size-4":"TafsirView_tafsir-font-size-4__KrD1k","tafsir-font-size-5":"TafsirView_tafsir-font-size-5__ri_Mr","tafsir-font-size-6":"TafsirView_tafsir-font-size-6__FvBko","tafsir-font-size-7":"TafsirView_tafsir-font-size-7__oS0XU","tafsir-font-size-8":"TafsirView_tafsir-font-size-8__1U_43","tafsir-font-size-9":"TafsirView_tafsir-font-size-9__6VJC2","tafsir-font-size-10":"TafsirView_tafsir-font-size-10__zRYWI"}},61085:function(e){e.exports={container:"_error_container__vJFnH",withFullWidth:"_error_withFullWidth__VEzYc",title:"_error_title__oLWAK",goBack:"_error_goBack__U4WNd",reportBug:"_error_reportBug__tsKmR"}},86719:function(e){e.exports={pageContainer:"index_pageContainer__Pxtn3",loadingContainer:"index_loadingContainer__WEZFc",flow:"index_flow__rCTR5",flowItem:"index_flowItem__GnXWz",additionalVerticalGap:"index_additionalVerticalGap__nzYz6",fullWidth:"index_fullWidth__1n4ux"}}},function(e){e.O(0,[49774,92888,40179],(function(){return t=77446,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
- //# sourceMappingURL=reflections-e778d176d7977fb4.js.map
|